﻿/*
 * 由SharpDevelop创建。
 * 用户： lucifer
 * 日期: 2011/3/17
 * 时间: 18:28
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;

namespace Yidu.Persister.Annotation
{
	 [System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple = false)]
	public class BindFieldAttribute : System.Attribute
	{
		///　<summary>
		///　初始化对象
		///　</summary>
		public BindFieldAttribute()
		{
		}
		///　<summary>
		///　初始化对象
		///　</summary>
		///　<param　name="name">字段名</param>
		public BindFieldAttribute(string name)
		{
			strName = name;
		}
		private string strName = null;
		///　<summary>
		///　数据字段名
		///　</summary>
		public string Name
		{
			get
			{
				return strName;
			}
		}
		private bool bolKey = false;
		///　<summary>
		///　该字段为关键字段，可用作查询条件
		///　</summary>
		public bool Key
		{
			get
			{
				return bolKey;
			}
			set
			{
				bolKey = value;
			}
		}
		private string strReadFormat = null;
		///　<summary>
		///　数据读取格式化字符串
		///　</summary>
		public string ReadFormat
		{
			get
			{
				return strReadFormat;
			}
			set
			{
				strReadFormat = value;
			}
		}
		private string strWriteFormat = null;
		///　<summary>
		///　数据存储格式化字符串
		///　</summary>
		public string WriteFormat
		{
			get
			{
				return strWriteFormat;
			}
			set
			{
				strWriteFormat = value;
			}
		}
	}
}
